package com.cl.service.impl;

import com.cl.mapper.VaccinesMapper;
import com.cl.pojo.Vaccines;
import com.cl.service.VaccinesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class VaccinesServiceImpl implements VaccinesService {
    @Autowired
    VaccinesMapper vaccinesMapper;
    @Override
    public List<Vaccines> queryAll() {
        return vaccinesMapper.queryAll();
    }

    @Override
    public List<Vaccines> queryAllLimit(int page, int limit) {
        return vaccinesMapper.queryAllLimit(page, limit);
    }

    @Override
    public int deleteByVno(int vNo) {
        return vaccinesMapper.deleteByVno(vNo);
    }

    @Override
    public int updateByVno(int vNo, String vName, String vPosition, String vWay, String vDose) {
        return vaccinesMapper.updateByVno(vNo, vName, vPosition, vWay, vDose);
    }

    @Override
    public int add(String vName, String vPosition, String vWay, String vDose) {
        return vaccinesMapper.add(vName, vPosition, vWay, vDose);
    }

    @Override
    public int countAll() {
        return vaccinesMapper.countAll();
    }

    @Override
    public List<Map<String, Object>> queryRecord(int vNo) {
        return vaccinesMapper.queryRecord(vNo);
    }
}
